package com.dynamite;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.event.KeyEvent;

import base.input.IInput;

public class EntityPlayer extends Entity implements IInput
{
	public EntityPlayer(float x, float y, double rot)
	{
		super(x, y, rot);
	}
	
	public void onInputUpdate(int par1, boolean par2)
	{
		switch(par1)
		{
		case KeyEvent.VK_UP:
			this.setMotion(0F, -10F);
			break;
		case KeyEvent.VK_DOWN:
			this.setMotion(0F, 10F);
			break;
		case KeyEvent.VK_LEFT:
			this.setMotion(-10F, 0F);
			break;
		case KeyEvent.VK_RIGHT:
			this.setMotion(10F, 0F);
			break;
		}
	}
	
	public void onUpdate()
	{
		super.onUpdate();
	}
	
	public void onRender(Graphics2D par1Graphics)
	{
		par1Graphics.setColor(Color.BLUE);
		par1Graphics.drawRect((int) this.posX - 16, (int) this.posY - 16, 16, 16);
	}
	
	public void onDestroy()
	{
		
	}
}
